home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / ab20 / ab20_archive / tex / texify-1.12.lzh / TeXifyLookNext.ced < prev    next >
Text File  |  1991-06-23  |  3KB  |  111 lines

  1. /********************************************************************************/
  2. /* ARexx program         TeXifyLookNext    V 1.01 (May 90)            */
  3. /*            ( use with TeXify 1.04 or greater !! )            */
  4. /*                                        */
  5. /*                This program can only be used in conjunction    */
  6. /*                with     TeXify.      After    TeXify    use    */
  7. /* Copyright 1990        TeXifyLookNext for getting further TeX error    */
  8. /* by Wolf-Juergen Faust    reports.   For  a new TeXifyLookNext version    */
  9. /* Am Dorfgarten 10        call  FIDO  +(49)  6173  2544  (HST  DS)  or    */
  10. /* W-6000 Frankfurt 50        contact  me.  Don't spread this file without    */
  11. /* Germany            the additional readme and Arexx files !        */
  12. /* FIDO: 2:243/43.5 (Wolf Faust)                        */
  13. /* UUCP: cbmvax.commodore.com!cbmehq!cbmger!venus!wfaust            */
  14. /* Tel: +(49) 69 5486556                            */
  15. /*                                        */
  16. /* Versions needed:                                */
  17. /* ARexx >= V 1.10  (tested: 1.10, 1.12, 1.14)                    */
  18. /* CEDPro>= V 2.00  (tested: 2.10, 2.11, 2.12)                    */
  19. /********************************************************************************/
  20.  
  21. /*** Return ***/
  22. cr = '0A'X
  23.  
  24. /*** program receives answers ***/
  25. options results
  26.  
  27. /*** now lets get to business with CygnusEd ***/
  28. address 'rexx_ced'
  29.  
  30. /*** is there a log file ??? ***/
  31. if ~exists('t:tex.log') then do
  32.     okay1 "Ooops ! There is no errorfile !"
  33.     exit
  34.     end
  35.  
  36. /*** get number off errors done ***/
  37. done = getclip("texlog")+1
  38. /*** get path to main textfile ***/
  39. path = getclip("texpath")
  40. /*** get suffix of main textfile ***/
  41. sfx = getclip("texsfx")
  42.  
  43. /*** search line with error description in t:tex.log ***/
  44. rc = open('log','t:tex.log')
  45. if rc = 0 then do
  46.     okay1 "ERROR ! Can't open existing errorfile !"
  47.     exit 5
  48.     end
  49. do lin = 1 for done
  50.     logline = readln('log')
  51.     if eof('log') then do
  52.         /*** no more error found in file ***/
  53.         call close 'log'
  54.         okay1 "No more error found !"
  55.         call delete("t:tex.log")
  56.         exit 5
  57.         end
  58.     end
  59. call close 'log'
  60.  
  61. parse var logline line pos filename cause
  62. setclip("texlog",done)
  63. strip (filename)
  64. strip (cause)
  65.  
  66. if filename = "!" then do
  67.     'jumpto' line pos
  68.     okay1 "Ooops ! Error in unknown TeX source !"||cr||cause||cr||"Error in line:"||line||"  pos:" pos
  69.     exit
  70.     end
  71. /*** this part looks strange, but there maybe strange filenames !! ***/
  72. 'jump to file' filename
  73. if result = 0 then do
  74.     if exists(path||filename) then do
  75.         'open new'
  76.         'open' path||filename
  77.         'jumpto' line pos
  78.         okay1 cause
  79.         exit 5
  80.         end
  81.     if exists(filename) then do
  82.         'open new'
  83.         'open' filename
  84.         'jumpto' line pos
  85.         okay1 cause
  86.         exit 5
  87.         end
  88.     'jump to file' filename||sfx
  89.     if result = 0 then do
  90.         if exists(path||filename||sfx) then do
  91.             'open new'
  92.             'open' path||filename||sfx
  93.             'jumpto' line pos
  94.             okay1 cause
  95.             exit 5
  96.             end
  97.         if exists(filename||sfx) then do
  98.             'open new'
  99.             'open' path||filename||sfx
  100.             'jumpto' line pos
  101.             okay1 cause
  102.             exit 5
  103.             end
  104.         'jumpto' line pos
  105.         okay1 "Ooops ! Error in "||filename||"  TeX file !"||cr||cause||cr||"Error in line:"||line||"  pos:" pos
  106.         exit 5
  107.         end
  108.     end
  109. 'jumpto' line pos
  110. okay1 cause
  111.